from queue import Queue

queue_object = Queue(10)

for i in range(4):
    queue_object.put(i)

while not queue_object.empty():
    print(queue_object.get())